// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_hm_rule_actions
// * CreateDate    : 2014-06-05 18:30:00
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:00
// * LastChanger   : 2014-06-05 18:30:00
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class HmRuleActionsEntity : EntityBase
    {
        public HmRuleActionsTable TableSchema
        {
            get
            {
                return HmRuleActionsTable.Current;
            }
		}
		
		public HmRuleActionsEntity()
        {

        }
		
		public HmRuleActionsEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Actionid = Convert.ToInt32(CommonFunctions.ToObject(dr["actionid"]));
			this.Actionruleid = Convert.ToInt32(CommonFunctions.ToObject(dr["actionruleid"]));
			this.Actiontype = Convert.ToByte(CommonFunctions.ToObject(dr["actiontype"]));
			this.Actionimapfolder = Convert.ToString(CommonFunctions.ToObject(dr["actionimapfolder"]));
			this.Actionsubject = Convert.ToString(CommonFunctions.ToObject(dr["actionsubject"]));
			this.Actionfromname = Convert.ToString(CommonFunctions.ToObject(dr["actionfromname"]));
			this.Actionfromaddress = Convert.ToString(CommonFunctions.ToObject(dr["actionfromaddress"]));
			this.Actionto = Convert.ToString(CommonFunctions.ToObject(dr["actionto"]));
			this.Actionbody = Convert.ToString(CommonFunctions.ToObject(dr["actionbody"]));
			this.Actionfilename = Convert.ToString(CommonFunctions.ToObject(dr["actionfilename"]));
			this.Actionsortorder = Convert.ToInt32(CommonFunctions.ToObject(dr["actionsortorder"]));
			this.Actionscriptfunction = Convert.ToString(CommonFunctions.ToObject(dr["actionscriptfunction"]));
			this.Actionheader = Convert.ToString(CommonFunctions.ToObject(dr["actionheader"]));
			this.Actionvalue = Convert.ToString(CommonFunctions.ToObject(dr["actionvalue"]));
			this.Actionrouteid = Convert.ToInt32(CommonFunctions.ToObject(dr["actionrouteid"]));
        }
		
		public HmRuleActionsEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Actionid = Convert.ToInt32(CommonFunctions.ToObject(dr["actionid"]));
			this.Actionruleid = Convert.ToInt32(CommonFunctions.ToObject(dr["actionruleid"]));
			this.Actiontype = Convert.ToByte(CommonFunctions.ToObject(dr["actiontype"]));
			this.Actionimapfolder = Convert.ToString(CommonFunctions.ToObject(dr["actionimapfolder"]));
			this.Actionsubject = Convert.ToString(CommonFunctions.ToObject(dr["actionsubject"]));
			this.Actionfromname = Convert.ToString(CommonFunctions.ToObject(dr["actionfromname"]));
			this.Actionfromaddress = Convert.ToString(CommonFunctions.ToObject(dr["actionfromaddress"]));
			this.Actionto = Convert.ToString(CommonFunctions.ToObject(dr["actionto"]));
			this.Actionbody = Convert.ToString(CommonFunctions.ToObject(dr["actionbody"]));
			this.Actionfilename = Convert.ToString(CommonFunctions.ToObject(dr["actionfilename"]));
			this.Actionsortorder = Convert.ToInt32(CommonFunctions.ToObject(dr["actionsortorder"]));
			this.Actionscriptfunction = Convert.ToString(CommonFunctions.ToObject(dr["actionscriptfunction"]));
			this.Actionheader = Convert.ToString(CommonFunctions.ToObject(dr["actionheader"]));
			this.Actionvalue = Convert.ToString(CommonFunctions.ToObject(dr["actionvalue"]));
			this.Actionrouteid = Convert.ToInt32(CommonFunctions.ToObject(dr["actionrouteid"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return HmRuleActionsTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public int Actionid
        {
            get { return Convert.ToInt32(GetData(HmRuleActionsTable.C_actionid)); }
            set { SetData(HmRuleActionsTable.C_actionid, value); }
        }
		
        [DataMember]
        public int Actionruleid
        {
            get { return Convert.ToInt32(GetData(HmRuleActionsTable.C_actionruleid)); }
            set { SetData(HmRuleActionsTable.C_actionruleid, value); }
        }
		
        [DataMember]
        public byte Actiontype
        {
            get { return Convert.ToByte(GetData(HmRuleActionsTable.C_actiontype)); }
            set { SetData(HmRuleActionsTable.C_actiontype, value); }
        }
		
        [DataMember]
        public string Actionimapfolder
        {
            get { return Convert.ToString(GetData(HmRuleActionsTable.C_actionimapfolder)); }
            set { SetData(HmRuleActionsTable.C_actionimapfolder, value); }
        }
		
        [DataMember]
        public string Actionsubject
        {
            get { return Convert.ToString(GetData(HmRuleActionsTable.C_actionsubject)); }
            set { SetData(HmRuleActionsTable.C_actionsubject, value); }
        }
		
        [DataMember]
        public string Actionfromname
        {
            get { return Convert.ToString(GetData(HmRuleActionsTable.C_actionfromname)); }
            set { SetData(HmRuleActionsTable.C_actionfromname, value); }
        }
		
        [DataMember]
        public string Actionfromaddress
        {
            get { return Convert.ToString(GetData(HmRuleActionsTable.C_actionfromaddress)); }
            set { SetData(HmRuleActionsTable.C_actionfromaddress, value); }
        }
		
        [DataMember]
        public string Actionto
        {
            get { return Convert.ToString(GetData(HmRuleActionsTable.C_actionto)); }
            set { SetData(HmRuleActionsTable.C_actionto, value); }
        }
		
        [DataMember]
        public string Actionbody
        {
            get { return Convert.ToString(GetData(HmRuleActionsTable.C_actionbody)); }
            set { SetData(HmRuleActionsTable.C_actionbody, value); }
        }
		
        [DataMember]
        public string Actionfilename
        {
            get { return Convert.ToString(GetData(HmRuleActionsTable.C_actionfilename)); }
            set { SetData(HmRuleActionsTable.C_actionfilename, value); }
        }
		
        [DataMember]
        public int Actionsortorder
        {
            get { return Convert.ToInt32(GetData(HmRuleActionsTable.C_actionsortorder)); }
            set { SetData(HmRuleActionsTable.C_actionsortorder, value); }
        }
		
        [DataMember]
        public string Actionscriptfunction
        {
            get { return Convert.ToString(GetData(HmRuleActionsTable.C_actionscriptfunction)); }
            set { SetData(HmRuleActionsTable.C_actionscriptfunction, value); }
        }
		
        [DataMember]
        public string Actionheader
        {
            get { return Convert.ToString(GetData(HmRuleActionsTable.C_actionheader)); }
            set { SetData(HmRuleActionsTable.C_actionheader, value); }
        }
		
        [DataMember]
        public string Actionvalue
        {
            get { return Convert.ToString(GetData(HmRuleActionsTable.C_actionvalue)); }
            set { SetData(HmRuleActionsTable.C_actionvalue, value); }
        }
		
        [DataMember]
        public int Actionrouteid
        {
            get { return Convert.ToInt32(GetData(HmRuleActionsTable.C_actionrouteid)); }
            set { SetData(HmRuleActionsTable.C_actionrouteid, value); }
        }
		
		#endregion
	}
	
	
}	

